<template>
  <div id="app">
    
    <img alt="Vue logo" src="./assets/logo.png" />
    <HelloWorld
      msg="Welcome to Your Vue.js App"
      :count="parentCount"
      @child-count-change="handler"
    >
     <template #footer="{childCount}">第一个footer{{childCount}}</template>
    </HelloWorld>
    <p >{{childData}}</p>
    <HelloWorld>默认插槽1</HelloWorld>
    <HelloWorld>默认插槽2</HelloWorld>
    <HelloWorld>默认插槽3</HelloWorld>
    <HelloWorld></HelloWorld>

  </div>
</template>

<script>
import HelloWorld from "./components/HelloWorld.vue";

export default {
  name: "App",
  components: {
    HelloWorld,
  },
  data() {
    return {
      parentCount: "1000", 
      childData: 0
    };
  },
  methods:{
    handler(childCount){
      this.childData=childCount
    }
  }
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
